import request from '@/utils/request'
import { ApiModulesRoutes } from '@/consts'

/**
 * 分页查询算法事件
 * @param {Object} paramVo
 * @param {String} paramVo.keyword 关键词检索
 * @param {Number} paramVo.pageSize
 * @param {Number} paramVo.pageNo
 * @return {Promise<AxiosResponse<any>>}
 */
export const apiFindEventPageByParam = async(paramVo) => {
  const url = ApiModulesRoutes.BASE + '/alg/event/findEventPageByParam'
  return await request.post(url, paramVo)
}
/**
 * 算法事件标记解决
 * @param eventId 事件id
 * @return {Promise<AxiosResponse<any>>}
 */
export const apiSolveAlgEvent = async(eventId) => {
  const url = ApiModulesRoutes.BASE + '/alg/event/solveAlgEvent'
  return await request.get(url, { params: { eventId } })
}

/**
 * 查询解决了的事件总数
 * @return {Promise<AxiosResponse<any>>}
 */
export const apiCountSolveEvent = async() => {
  const url = ApiModulesRoutes.BASE + '/alg/event/countSolveEvent'
  return await request.get(url)
}


